package com.springcloud.consumer.Remote;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @program: SpringBootCloud
 * @description: feign调用实现
 * @author: 肖垚 1094890313@qq.com
 * @create: 2019年01月18日 09:44
 **/
@FeignClient(name = "spring-cloud-producer", fallback = HelloRemoteHystrix.class)
//@FeignClient("spring-cloud-producer")
public interface HelloRemote {

    @RequestMapping(value = "/hello", method = RequestMethod.GET)
    public String hello(@RequestParam(value = "name") String name);

    @RequestMapping(value = "/hello2", method = RequestMethod.GET)
    public String hello2(@RequestParam(value = "name") String name);
}